/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sd.chat;

import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.util.Vector;

/**
 *
 * @author Old
 */
public class OSSender extends Thread {
    
    private sendControler controler;
    private boolean mustRun = true;
    private Logger log = new Logger(true);

    public OSSender(sendControler controler) {
        this.controler = controler;
    }
    
    @Override
    public void run() {
        while(mustRun){
            controler.sendMessages();
        }
        log.outln("OSSender terminating...");
    }

    public boolean isMustRun() {
        return mustRun;
    }

    public void setMustRun(boolean mustRun) {
        this.mustRun = mustRun;
    }    
}
